package cn.itcast.n3;

/**
 * className: TestFrames
 * description:
 * date: 2023/2/10 0010-PM 9:51:30
 * <p>
 * project: concurrent
 * package: cn.itcast.n3
 * email: 1085844536@qq.com
 * version:
 *
 * @author WangGuojian
 */
public class TestFrames {

    public static void main(String[] args) {
        Thread t1 = new Thread() {
            @Override
            public void run() {
                method1(20);
            }
        };
        t1.setName("t1");
        t1.start();
        method1(10);
    }

    private static void method1(int x) {
        int y = x + 1;
        Object m = method2();
        System.out.println(m);
    }

    private static Object method2() {
        Object n = new Object();
        return n;
    }
}
